<?php

use think\facade\Route;
use app\admin\middleware\Token;
use app\admin\middleware\CheckAdmin;

// 管理员管理路由
Route::group('admin', function () {
    Route::get('list', 'app\admin\controller\Admin@list');
    Route::post('add', 'app\admin\controller\Admin@add');
    Route::post('edit', 'app\admin\controller\Admin@edit');
    Route::delete('delete', 'app\admin\controller\Admin@delete');
    Route::post('avatar/upload', 'app\admin\controller\Upload@uploadAvatar');
})->middleware([Token::class, CheckAdmin::class])->allowCrossDomain();
